def problem1(x):
    return x % 2 == 0


def problem2(x):
    return 4 < x <= 12


def isTrue(x):
    return 1 if x else 0

a = int(input())
p1= problem1(a)
p2 = problem2(a)
frist = isTrue(p1 and p2)
second = isTrue(p1 or p2)
third = isTrue((p1 and not p2)or (not p1 and p2))
fourth = isTrue(not p1 and not p2)

print("%d %d %d %d" % (frist, second, third, fourth))
